<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class ProducerAdv extends Base
{
    use SoftDeletes;
    protected $table = 'producer_adv';


//    protected $casts = [
//        'type' => 'array',
//    ];

//    public function setTypeAttribute($val) {
//        $this->attributes['type'] = $val;
//    }

    public function merchant() {
        return $this->belongsTo(Merchant::class, 'merchant_id');
    }

    public function getTypeAttribute($type) {
        return Enum::getValueDisplay($type);
    }



}
